home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Technotools
/
Technotools (Chestnut CD-ROM)(1993).ISO
/
lang_c
/
cgraphix
/
dp.c
< prev
next >
Wrap
Text File
|
1986-05-05
|
643b
|
28 lines
/* «RM120»«PL99999»«TS4,8,12,16,20,24,28,32,36,40,44,48,52,56,60,64,68,72,76» */
#include <stdio.h>
#define EXTERN extern
#include <typedef.h>
extern unsigned seg();
void DP(X, Y)
int X, Y;
{
static unsigned char mask[] =
{ 0x7f, 0xbf, 0xdf, 0xef, 0xf7, 0xfb, 0xfd, 0xfe };
unsigned byte;
unsigned offset;
unsigned char m;
unsigned i, j, k;
offset = BaseAddress(Y)+((int)(X/8)); /* offset of pixel's byte */
m = mask[X % 8]; /* bit in byte to set */
byte = 0xff & peek(offset, GrafBase);
byte = 0xff & ((byte & m) | ((0xff & ColorGlb) & NOT m));
pokeb(offset, GrafBase, byte);
}